package com.jzo2o.market.controller;

import com.jzo2o.market.model.dto.request.CouponOperationPageQueryReqDTO;
import com.jzo2o.market.model.dto.response.CouponQueryForPageResDTO;
import com.jzo2o.market.service.ICouponService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 *   Description 优惠卷服务
 *   @author zhangyan
 *   @time   2024/12/15
 */
@RestController("couponController")
@Api(tags = "优惠卷服务")
@Slf4j
@RequestMapping("/operation/coupon")
public class CouponController {
    @Autowired
    private ICouponService couponService;


    @GetMapping("/page")
    @ApiOperation("分页查询优惠卷")
    public CouponQueryForPageResDTO queryPage(CouponOperationPageQueryReqDTO dto){
        return couponService.queryPage(dto);
    }
}
